// Problem 052: Permuted multiples
// It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order.
// Find the smallest positive integer, x, such that 2x, 3x, 4x, 5x, and 6x, contain the same digits.

package main

import (
	"fmt"
	"projecteuler/euler"
)

func p052() {
	for n := 123456; n < 166667; n++ {
		if euler.CompareInDigits(n, 2*n) && euler.CompareInDigits(3*n, 4*n) && euler.CompareInDigits(5*n, 6*n) && euler.CompareInDigits(n, 3*n) && euler.CompareInDigits(3*n, 5*n) {
			fmt.Println("Problem 052:", n)
			return
		}
	}
}
